<template>
  <div class="base-frame-wrap" v-show="active" :name="name">
    <iframe class="ifa" :src="url" frameborder="0"></iframe>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    name: String,
    src: String,
  },
  data() {
    return {}
  },
  computed: {
    url() {
      const pos = this.src.indexOf('_')
      return this.src.substring(pos + 1)
    },
    active() {
      return this.$store.state.tagsView.currentView.name === this.name
    },
  },
  created() {},
  methods: {},
}
</script>

<style lang="less">
.base-frame-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  .ifa {
    width: 100%;
    height: 100%;
  }
}
</style>
